home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11469 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.8 KB  |  56 lines

  1. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  2. Path: in2.uu.net!world!bobduff
  3. From: bobduff@world.std.com (Robert A Duff)
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Message-ID: <Do9tMv.2p3@world.std.com>
  6. Organization: The World Public Access UNIX, Brookline, MA
  7. References: <00001a73+00002504@msn.com> <4i4s5f$igc@solutions.solon.com> <3146E324.5C1E@lfwc.lockheed.com> <4i98gg$8n1@solutions.solon.com>
  8. Date: Thu, 14 Mar 1996 18:49:43 GMT
  9.  
  10. In article <4i98gg$8n1@solutions.solon.com>,
  11. Peter Seebach <seebs@solutions.solon.com> wrote:
  12. >No.  And, SINCE THE LANGUAGE DOES NOT SPECIFY COMPILATION ORDER, COMPILATION
  13. >ORDER HAS NOTHING TO DO WITH C.
  14.  
  15. There's some misinformation going on here.  The Ada RM does *NOT*
  16. require a particular compilation order.  Neither does C.
  17.  
  18. Some Ada compilers require a particular compilation order, but this is
  19. not necessary.  For example, using GNAT, you can compile in any order
  20. you like, and you can even compile two things in parallel.  This is good
  21. -- it's nothing but a pain in the butt to have to follow some silly
  22. ordering rules.
  23.  
  24. What Ada *does* require is consistency.  If two units refer to a third
  25. unit, then they have to refer to the same version of the third unit (or
  26. compatible versions of it).  This is really necessary in C, too, when
  27. using include files, the difference being that Ada compilers are
  28. required to tell you about inconsistencies, whereas C compilers are not.
  29.  
  30. In both C and Ada, you really need an additional tool that automatically
  31. figures out which things need to be recompiled when you make a change.
  32. Ada does *NOT* require such a tool to exist, and neither does C.  It is
  33. possible to write such a tool for *both* languages -- for Ada, it parses
  34. the with_clauses; for C it parses the #include statements.  In fact,
  35. such a tool is a lot easier to write for C than for Ada.  The problem
  36. with 'make' is that you have to type in the dependences by hand.  But
  37. nothing about C requires the use of 'make' -- it is entirely possible to
  38. have a more automatic tool.  IMHO, direct use of 'make', with
  39. hand-written make files, is the wrong approach for C or Ada or any other
  40. language (unless you have fewer than about 5 files in your program).
  41.  
  42. So, neither C nor Ada give you what you really want -- a tool that
  43. automatically builds your program.  So I don't think you can argue that
  44. either language is better than the other in this regard.  This is fine
  45. -- it's not necessary to specify every imaginable Good Thing as part of
  46. your *language* standard.
  47.  
  48. You could argue that Ada is better because it complains when there's an
  49. inconsistency.  Fine, but for a large program, it's a nightmare to
  50. figure out what to *do* about that inconsistency, unless you have an
  51. automatic tool (not 'make').  So, in practice, you need a separate tool
  52. anyway, and if you use it religiously, you won't get burned by
  53. inconsistencies in *either* language.
  54.  
  55. - Bob
  56.